package com.example.zhilongzhang.constructionpayapp.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.zhilongzhang.constructionpayapp.R;
import com.example.zhilongzhang.constructionpayapp.bean.RecordListBean;

import java.util.List;

public class RecordAdapter extends BaseQuickAdapter<RecordListBean.DataEntity, BaseViewHolder> {
    public RecordAdapter(int layoutResId, @Nullable List<RecordListBean.DataEntity> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, RecordListBean.DataEntity item) {
        if (item.getRemitter()!=null){
            helper.setText(R.id.item_address, item.getRemitter());
        }
        helper.setText(R.id.item_time, item.getPaymentTime());
        helper.setText(R.id.item_num, "+"+String.valueOf(item.getAmount()));
    }


}
